
var htmlWP=require("html-webpack-plugin");
module.exports={
	entry:"./src/main.js",
	output:{
		path:__dirname+"./dist",
		filename:"build.js"
	},
	module:{
		loaders:[
			{
				test:/\.css$/,
				loader:"style-loader!css-loader"
			},
			{
				test:/\.scss$/,
				loader:"style-loader!css-loader!sass-loader"
			},
			{
				test:/\.less$/,
				loader:"style-loader!css-loader!less-loader"
			},
			{
				test:/\.(jpg|png|gif|ttf|bmp)$/,
				loader:"url-loader?limit=40000"
			},
			// {
			// 	test:/\.js$/,
			// 	loader:"babel-loader",
			// 	exclude:/node_modules/
			// },
			{
				test:/.vue$/,
				loader:"vue-loader"
			}
		]
	},

	// 由于webpack2.0已经支持ES6转ES5的语法，所以下面这个配置可以删掉了
	// babel:{
	// 	presets:["es2015"],
	// 	plugins:["transform-runtime"]
	// },
	plugins:[
		new htmlWP({
			title:"shouye",
			filename:"index.html",
			template:"index1.html"
		})
	]
}